home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / bash / bash-1~1 / bash1135.zoo / bash-1.13.5 / Makefile-ST < prev    next >
Encoding:
Makefile  |  1994-03-16  |  26.8 KB  |  745 lines

  1.  
  2. # This Makefile is automagically made from cpp-Makefile and then
  3. # edited to fit it my purpose to compile it for and with an atari.
  4. # (krinke@ips.cs.tu-bs.de)
  5.  
  6. # We would like you to use Bison instead of Yacc since some
  7. # versions of Yacc cannot handle reentrant parsing. Unfortunately,
  8. # this includes the Yacc currently being shipped with SunOS4.x.
  9. # If you do use Yacc, please make sure that any bugs in parsing
  10. # are not really manifestations of Yacc bugs before you report
  11. # them.
  12.  
  13. prefix = /usr/local
  14.  
  15. exec_prefix = $(prefix)
  16. bindir = $(exec_prefix)/bin
  17. libdir = $(exec_prefix)/lib
  18.  
  19. manroot = $(prefix)/man
  20.  
  21. man1ext = 1
  22. man1dir = $(manroot)/man$(man1ext)
  23. mandir = $(man1dir)
  24. manext = $(man1ext)
  25.  
  26. infodir = $(prefix)/info
  27.  
  28. srcdir = .
  29. VPATH = $(srcdir)
  30.  
  31. # Here is a rule for making .o files from .c files that does not
  32. # force the type of the machine (like -"atarist") into the flags.
  33. .c.o:
  34.     $(RM) $@
  35.     $(CC) $(CFLAGS) $(CPPFLAGS) -c $*.c
  36.  
  37. BISON = bison -y
  38.  
  39. CC = gcc $(GCC_EXTRAS)
  40.  
  41. # If the user has specified a Make shell, then use that.
  42.  
  43. SHELL=/bin/sh
  44.  
  45. RM = rm -f
  46. AR = ar
  47. COMPRESS = gzip
  48. COMPRESS_EXT = .gz
  49.  
  50. Machine = "atarist"
  51. OS = "MiNT"
  52.  
  53. # PROFILE_FLAGS is either -pg, to generate profiling info for use
  54. # with gprof, or nothing (the default).
  55. PROFILE_FLAGS=
  56.  
  57. # This system has some peculiar flags that must be passed to the
  58. # the C compiler (or to cpp).
  59. SYSDEP = -DHAVE_UID_T -DHAVE_BCOPY -DMKFIFO_MISSING -D_BSD_SOURCE
  60.  
  61. # This system has the setlinebuf () call.
  62. LINEBUF = -DHAVE_SETLINEBUF
  63.  
  64. # This system has the vprintf () and vfprintf () calls.
  65. VPRINTF = -DHAVE_VFPRINTF
  66.  
  67. # This system has <unistd.h>.
  68.  
  69. UNISTD = -DHAVE_UNISTD_H
  70.  
  71. # This system has <stdlib.h>
  72.  
  73. STDLIB = -DHAVE_STDLIB_H
  74.  
  75. # This system has <limits.h>
  76.  
  77. LIMITSH = -DHAVE_LIMITS_H
  78.  
  79. # This system has <sys/resource.h>
  80. RESOURCE = -DHAVE_RESOURCE
  81.  
  82. # This system has the strerror () function.
  83. STRERROR = -DHAVE_STRERROR
  84.  
  85. # This system has <sys/wait.h>
  86. WAITH = -DHAVE_WAIT_H
  87.  
  88. # This system has the getwd () call.
  89. GETWD = -DHAVE_GETWD
  90.  
  91. # This system has a working version of dup2 ().
  92. DUP2 = -DHAVE_DUP2
  93.  
  94. # This system uses struct dirent for reading directories with readdir.
  95. DIRENT = -DHAVE_DIRENT
  96.  
  97. # This system has /usr/include/dirent.h
  98. DIRENTH = -DHAVE_DIRENT_H
  99.  
  100. # This system has /usr/include/string.h
  101. STRINGH = -DHAVE_STRING_H
  102.  
  103. # This system has /usr/include/varargs.h
  104. VARARGSH = -DHAVE_VARARGS_H
  105.  
  106. # This system has strchr () and strrchr () string functions.
  107. STRCHR = -DHAVE_STRCHR
  108.  
  109. SYSTEM_FLAGS =     $(LINEBUF) $(VPRINTF) $(UNISTD) $(STDLIB) $(LIMITSH) \
  110.         $(GROUPS) $(RESOURCE) $(SIGHANDLER) $(SYSDEP) $(WAITH) \
  111.         $(GETWD) $(DUP2) $(STRERROR) $(DIRENT) $(DIRENTH) \
  112.         $(STRINGH) $(VARARGSH) $(STRCHR) $(DEVFD) \
  113.         -D$(Machine) -D$(OS)
  114. DEBUG_FLAGS = $(PROFILE_FLAGS) -O2 -mpcrel -mbaserel -fomit-frame-pointer
  115. # DEBUG_FLAGS =     $(PROFILE_FLAGS) -mpcrel -mbaserel
  116. LDFLAGS    =     $(NOSHARE) $(SYSDEP_LD) $(EXTRA_LD_PATH) $(DEBUG_FLAGS)
  117. CFLAGS    =     $(DEBUG_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS) \
  118.         $(MALLOC_CFLAGS)
  119. CPPFLAGS= -DEAGAIN=EREAD -I. -I$(LIBSRC)
  120.  
  121. # The location of sources for the support libraries.
  122. LIBSRC = ./lib/
  123.  
  124. # Preface building with the full path of the current library source.
  125. LIBINC_DECL = LIBINCDIR=`pwd`; export LIBINCDIR
  126. LIBINC_USAGE = "-I$${LIBINCDIR} -I$${LIBINCDIR}/$(LIBSRC)"
  127.  
  128. # Flags used when building libraries.
  129. LIBRARY_CFLAGS = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
  130.         $(SYSDEP) $(DIRENT) $(DIRENTH) $(STRINGH) $(VARARGSH) \
  131.         $(PTEM) $(PTE) $(STRCHR) -D$(Machine) -D$(OS) $(UNISTD) \
  132.         $(LIMITSH) $(STDLIB) -DSHELL
  133.  
  134. # The compiler being used to build Bash can handle -L/library/path.
  135. SEARCH_LIB = -L
  136.  
  137. RL_LIBSRC = $(LIBSRC)readline/
  138. RL_LIBDOC = $(RL_LIBSRC)doc/
  139.  
  140. # The source, object and documentation of the GNU Readline library.
  141. READLINE_SOURCE    = $(RL_LIBSRC)rldefs.h $(RL_LIBSRC)readline.h \
  142.          $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)keymaps.h \
  143.          $(RL_LIBSRC)funmap.c $(RL_LIBSRC)emacs_keymap.c \
  144.          $(RL_LIBSRC)search.c $(RL_LIBSRC)vi_keymap.c \
  145.          $(RL_LIBSRC)keymaps.c $(RL_LIBSRC)parens.c \
  146.          $(RL_LIBSRC)vi_mode.c $(RL_LIBSRC)history.c \
  147.          $(RL_LIBSRC)readline.c $(RL_LIBSRC)tilde.c \
  148.          $(RL_LIBSRC)rltty.c $(RL_LIBSRC)complete.c \
  149.          $(RL_LIBSRC)bind.c $(RL_LIBSRC)isearch.c \
  150.          $(RL_LIBSRC)display.c $(RL_LIBSRC)signals.c \
  151.          $(RL_LIBSRC)posixstat.h $(RL_LIBSRC)tilde.h \
  152.          $(RL_LIBSRC)xmalloc.c
  153.  
  154. READLINE_OBJ =    $(RL_LIBSRC)readline.o $(RL_LIBSRC)funmap.o \
  155.         $(RL_LIBSRC)parens.o $(RL_LIBSRC)search.o \
  156.         $(RL_LIBSRC)keymaps.o $(RL_LIBSRC)history.o \
  157.         $(RL_LIBSRC)rltty.o $(RL_LIBSRC)complete.o \
  158.         $(RL_LIBSRC)bind.o $(RL_LIBSRC)isearch.o \
  159.         $(RL_LIBSRC)display.o $(RL_LIBSRC)signals.o \
  160.         $(RL_LIBSRC)tilde.o $(RL_LIBSRC)xmalloc.o
  161.  
  162. READLINE_DOC =    $(RL_LIBDOC)rlman.texinfo $(RL_LIBDOC)rluser.texinfo \
  163.         $(RL_LIBDOC)rltech.texinfo
  164.  
  165. READLINE_DOC_SUPPORT =     $(RL_LIBDOC)Makefile $(RL_LIBDOC)readline.dvi \
  166.             $(RL_LIBDOC)readline.info
  167.  
  168. # This has to be written funny to avoid looking like a C comment starter.
  169. READLINE_EXAMPLES = $(RL_LIBSRC)examples/[a-zA-Z]*.[ch] \
  170.         $(RL_LIBSRC)examples/Makefile $(RL_LIBSRC)examples/Inputrc
  171.  
  172. # Support files for GNU Readline.
  173. READLINE_SUPPORT =     $(RL_LIBSRC)Makefile $(RL_LIBSRC)ChangeLog \
  174.             $(RL_LIBSRC)COPYING $(READLINE_EXAMPLES) \
  175.             $(READLINE_DOC_SUPPORT)
  176.  
  177. READLINE_CFLAGS = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
  178.         $(SYSDEP) -D$(Machine) -D$(OS) $(UNISTD) $(STDLIB) \
  179.         $(LIMITSH)
  180.  
  181. HIST_LIBSRC = $(LIBSRC)readline/
  182. HIST_LIBDOC = $(HIST_LIBSRC)doc/
  183.  
  184. HISTORY_CFLAGS = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
  185.         $(SYSDEP) -D$(Machine) -D$(OS) $(UNISTD) $(STDLIB) \
  186.         $(LIMITSH)
  187.  
  188. # The source, object and documentation of the history library.
  189. HISTORY_SOURCE    = $(HIST_LIBSRC)history.c $(HIST_LIBSRC)history.h
  190. HISTORY_OBJ    = $(HIST_LIBSRC)history.o
  191. HISTORY_DOC    = $(HIST_LIBDOC)hist.texinfo $(HIST_LIBDOC)hsuser.texinfo \
  192.           $(HIST_LIBDOC)hstech.texinfo
  193.  
  194. # Directory list for -L so that the link editor (ld) can find -lhistory.
  195.  
  196. GLOB_LIBSRC = $(LIBSRC)glob/
  197.  
  198. GLOB_SOURCE =     $(GLOB_LIBSRC)glob.c $(GLOB_LIBSRC)fnmatch.c \
  199.         $(GLOB_LIBSRC)fnmatch.h
  200. GLOB_OBJ = $(GLOB_LIBSRC)glob.olb
  201. GLOB_DOC = $(GLOB_LIBSRC)doc/glob.texi $(GLOB_LIBSRC)doc/Makefile
  202. GLOB_SUPPORT = $(GLOB_LIBSRC)Makefile $(GLOB_LIBSRC)ChangeLog
  203.  
  204. GLOB_LDFLAGS = $(SEARCH_LIB)$(GLOB_LIBSRC)
  205.  
  206. GLOB_LIB = -lglob
  207.  
  208. # The source, object and documentation for the GNU Tilde library.
  209. TILDE_LIBSRC = $(LIBSRC)tilde/
  210. TILDE_LIB = -ltilde
  211.  
  212. TILDE_SOURCE    = $(TILDE_LIBSRC)tilde.c $(TILDE_LIBSRC)tilde.h
  213. TILDE_OBJ    = $(TILDE_LIBSRC)tilde.o
  214. TILDE_DOC    = $(TILDE_LIBSRC)doc/tilde.texi $(TILDE_LIBSRC)doc/Makefile
  215. TILDE_SUPPORT    = $(TILDE_LIBSRC)Makefile $(TILDE_LIBSRC)ChangeLog
  216.  
  217. TILDE_LDFLAGS = $(SEARCH_LIB)$(TILDE_LIBSRC)
  218.  
  219. # Our malloc library.
  220.  
  221. BASHPOSIX_LIB = $(LIBSRC)posixheaders/
  222. BASHPOSIX_SUPPORT = $(BASHPOSIX_LIB)posixstat.h $(BASHPOSIX_LIB)ansi_stdlib.h
  223.  
  224. # Declare all of the sources for the libraries that we have.
  225. LIBRARY_SOURCE = $(READLINE_SOURCE) $(HISTORY_SOURCE) $(TERMCAP_SOURCE) \
  226.         $(GLOB_SOURCE) $(TILDE_SOURCE) $(MALLOC_SOURCE)
  227. LIBRARY_DOC = $(READLINE_DOC) $(HISTORY_DOC) $(TERMCAP_DOC) $(GLOB_DOC) \
  228.         $(TILDE_DOC) $(MALLOC_DOC)
  229. LIBRARY_SUPPORT = $(READLINE_SUPPORT) $(HISTORY_SUPPORT) $(TERMCAP_SUPPORT) \
  230.         $(GLOB_SUPPORT) $(TILDE_SUPPORT) $(MALLOC_SUPPORT)
  231. LIBRARY_TAR = $(LIBRARY_SOURCE) $(LIBRARY_DOC) $(LIBRARY_SUPPORT)
  232.  
  233. # You wish to compile with the line editing features installed.
  234. READLINE_LIB = -lreadline
  235.  
  236. # You only need termcap (or curses) if you are linking with GNU Readline.
  237.  
  238. TERMCAP_LIB = -lbtermcap
  239.  
  240. # Directory list for -L so that the link editor (ld) can find -lreadline.
  241.  
  242. READLINE_LDFLAGS = $(SEARCH_LIB)$(RL_LIBSRC) $(TERMCAP_LDFLAGS)
  243.  
  244. # The source and object of the bash<->readline interface code.
  245. RL_SUPPORT_SRC = bashline.c bracecomp.c
  246. RL_SUPPORT_OBJ = bashline.o $(BRACECOMP_OBJECT)
  247.  
  248. # The order is important. Most dependent first.
  249.  
  250. LIBRARIES = $(READLINE_LIB) $(HISTORY_LIB) $(TERMCAP_LIB) $(GLOB_LIB) \
  251.         $(TILDE_LIB) $(MALLOC_LIB) $(LOCAL_LIBS)
  252.  
  253. READLINE_DEP = $(RL_LIBSRC)readline.olb
  254.  
  255. GLOB_DEP = $(GLOB_LIBSRC)glob.olb
  256.  
  257. TILDE_DEP = ./lib/tilde/tilde.olb
  258.  
  259. # Source files for libraries that Bash depends on.
  260. LIBDEP = $(READLINE_DEP) $(TERMCAP_DEP) $(GLOB_DEP) $(HISTORY_DEP) \
  261.     $(TILDE_DEP) $(MALLOC_DEP)
  262.  
  263. # Rules for cleaning the readline and termcap sources.
  264.  
  265. LIBRARY_LDFLAGS = $(READLINE_LDFLAGS) $(HISTORY_LDFLAGS) $(TILDE_LDFLAGS) \
  266.         $(GLOB_LDFLAGS) $(MALLOC_LDFLAGS)
  267.  
  268. # These are required for sending bug reports.
  269. SYSTEM_NAME = $(Machine)
  270. OS_NAME = $(OS)
  271.  
  272. # The name of this program.
  273. Program = bash
  274.  
  275. # The type of machine Bash is being compiled on.
  276. HOSTTYPE_DECL = -DHOSTTYPE='$(SYSTEM_NAME)'
  277.  
  278. # The default primary and secondary prompts.
  279. PPROMPT = '"${Program}\\$$ "'
  280. SPROMPT = '"> "'
  281.  
  282. bash_maintainer = krinke
  283. MAINTAIN_DEFINE = -DMAINTAINER='"$(bash_maintainer)"'
  284.  
  285. # The group of configuration flags. These are for shell.c
  286. CFG_FLAGS = -DPPROMPT=$(PPROMPT) -DSPROMPT=$(SPROMPT) -DOS_NAME='$(OS_NAME)' \
  287.     -DSYSTEM_NAME='$(SYSTEM_NAME)' $(SIGLIST_FLAG) $(MAINTAIN_DEFINE)
  288.  
  289. # The directory which contains the source for malloc. The name must
  290. # end in a slash, as in "./lib/malloc/".
  291. ALLOC_DIR = ./lib/malloc/
  292.  
  293. # Our malloc.
  294.  
  295. ALLOCA_H_DEFINE =
  296.  
  297. ALLOCA_DEFINE = -DHAVE_ALLOCA
  298.  
  299. ALLOCA_CFLAGS = $(ALLOCA_DEFINE) $(ALLOCA_H_DEFINE)
  300.  
  301. ALLOC_HEADERS = $(ALLOC_DIR)getpagesize.h
  302. ALLOC_FILES = $(ALLOC_DIR)malloc.c $(ALLOC_DIR)alloca.c $(ALLOC_DIR)xmalloc.c \
  303.         $(ALLOC_DIR)i386-alloca.s $(ALLOC_DIR)x386-alloca.s
  304.  
  305. # The location of ranlib on your system.
  306.  
  307. RANLIB = ar s
  308.  
  309. # The source and object of the curly brace expansion and completion code.
  310. BRACES_SOURCE     = braces.c
  311. BRACECOMP_SOURCE = bracecomp.c
  312.  
  313. BRACES_OBJECT = braces.o
  314.  
  315. BRACECOMP_OBJECT = bracecomp.o
  316.  
  317. # Locally required libraries.
  318. LOCAL_LIBS = 
  319.  
  320. BUILTINS_LIB = builtins/libbuiltins.a
  321.  
  322. # The main source code for the Bourne Again SHell.
  323. CSOURCES = shell.c parse.y general.c make_cmd.c print_cmd.c y.tab.c \
  324.      dispose_cmd.c execute_cmd.c variables.c $(GLOBC) version.c \
  325.      expr.c copy_cmd.c flags.c subst.c hash.c mailcheck.c \
  326.      test.c trap.c jobs.c nojobs.c $(ALLOC_FILES) $(BRACES_SOURCE) \
  327.      vprint.c input.c \
  328.      unwind_prot.c siglist.c getcwd.c $(RL_SUPPORT_SRC) error.c
  329.  
  330. HSOURCES = shell.h flags.h trap.h hash.h jobs.h builtins.h alias.c y.tab.h      general.h variables.h config.h $(ALLOC_HEADERS) alias.h maxpath.h      quit.h machines.h posixstat.h filecntl.h unwind_prot.h parser.h      command.h input.h error.h bashansi.h dispose_cmd.h make_cmd.h      subst.h siglist.h
  331.  
  332. SOURCES     = $(CSOURCES) $(HSOURCES) $(BUILTIN_DEFS)
  333.  
  334. # Matching object files.
  335. OBJECTS     = shell.o y.tab.o general.o make_cmd.o print_cmd.o $(GLOBO) \
  336.      dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o \
  337.      expr.o flags.o jobs.o subst.o hash.o mailcheck.o test.o \
  338.      trap.o alias.o $(MALLOC) $(ALLOCA) $(BRACES_OBJECT) unwind_prot.o \
  339.      $(VPRINT_OBJ) input.o \
  340.      $(SIGLIST) $(GETCWD) version.o $(RL_SUPPORT_OBJ) $(BUILTINS_LIB) \
  341.      sim_pipe.o
  342.  
  343. # Where the source code of the shell builtins resides.
  344. DEFDIR = builtins/
  345. BUILTIN_DEFS = $(DEFDIR)alias.def $(DEFDIR)bind.def $(DEFDIR)break.def \
  346.     $(DEFDIR)builtin.def $(DEFDIR)cd.def $(DEFDIR)colon.def \
  347.     $(DEFDIR)command.def $(DEFDIR)declare.def $(LOAD_DEF) \
  348.     $(DEFDIR)echo.def $(DEFDIR)enable.def $(DEFDIR)eval.def \
  349.     $(DEFDIR)exec.def $(DEFDIR)exit.def $(DEFDIR)fc.def \
  350.     $(DEFDIR)fg_bg.def $(DEFDIR)hash.def $(DEFDIR)help.def \
  351.     $(DEFDIR)history.def $(DEFDIR)jobs.def $(DEFDIR)kill.def \
  352.     $(DEFDIR)let.def $(DEFDIR)read.def $(DEFDIR)return.def \
  353.     $(DEFDIR)set.def $(DEFDIR)setattr.def $(DEFDIR)shift.def \
  354.     $(DEFDIR)source.def $(DEFDIR)suspend.def $(DEFDIR)test.def \
  355.     $(DEFDIR)times.def $(DEFDIR)trap.def $(DEFDIR)type.def \
  356.     $(DEFDIR)ulimit.def $(DEFDIR)umask.def $(DEFDIR)wait.def \
  357.     $(DEFDIR)getopts.def $(DEFDIR)reserved.def
  358. BUILTIN_C_CODE = $(DEFDIR)mkbuiltins.c $(DEFDIR)common.c \
  359.          $(DEFDIR)hashcom.h $(DEFDIR)/bashgetopt.c $(GETOPT_SOURCE)
  360. GETOPT_SOURCE = $(DEFDIR)getopt.c $(DEFDIR)getopt.h
  361. PSIZE_SOURCE    = $(DEFDIR)psize.sh $(DEFDIR)psize.c
  362. BUILTIN_SUPPORT = $(DEFDIR)Makefile $(DEFDIR)ChangeLog $(PSIZE_SOURCE) \
  363.          $(BUILTIN_C_CODE)
  364.  
  365. # Documentation for the shell.
  366. DOCDIR = ./documentation/
  367. BASH_TEXINFO = $(DOCDIR)*.texi $(DOCDIR)*.tex $(DOCDIR)texindex.c \
  368.      $(DOCDIR)*.dvi $(DOCDIR)Makefile
  369. BASH_MAN = $(DOCDIR)bash.1
  370. BASHDOCS = $(BASH_TEXINFO) $(BASH_MAN) INSTALL README RELEASE
  371. DOCUMENTATION = $(BASHDOCS) $(LIBRARY_DOC)
  372.  
  373. # Some example files demonstrating use of the shell.
  374.  
  375. EXAMPLES = examples/[a-zA-Z]*
  376.  
  377. ENDIAN_SUPPORT = endian.c
  378.  
  379. ENDIAN_HEADER =
  380.  
  381. ENDIAN_OUTPUT = endian.aux $(ENDIAN_HEADER)
  382.  
  383. SIGNAMES_SUPPORT = signames.c
  384. SIGNAMES_OUTPUT = signames.aux signames.h
  385.  
  386. SDIR = ./support/
  387. MKTARFILE = $(SDIR)mktarfile
  388. SCRIPTS_SUPPORT = $(SDIR)mksysdefs $(SDIR)cppmagic $(SDIR)cat-s \
  389.          $(MKTARFILE) $(SDIR)mail-shell $(SDIR)inform \
  390.          $(SDIR)/fixdist $(SDIR)mklinks $(SDIR)PORTING \
  391.          $(SDIR)/clone.bash
  392. FAQ = $(SDIR)FAQ
  393.  
  394. TEST_SUITE = ./test-suite/
  395. TEST_SUITE_SUPPORT = $(TEST_SUITE)[a-zA-Z0-9]*
  396.  
  397. CREATED_SUPPORT = $(ENDIAN_OUTPUT) $(SIGNAMES_OUTPUT) sysdefs.h \
  398.          $(SDIR)getcppsyms
  399.  
  400. SUPPORT = configure $(ENDIAN_SUPPORT) $(SIGNAMES_SUPPORT) $(SCRIPTS_SUPPORT) \
  401.      $(BUILTIN_SUPPORT) COPYING Makefile cpp-Makefile ChangeLog \
  402.      .distribution newversion.c $(EXAMPLES) $(SDIR)bash.xbm $(FAQ) \
  403.      $(SDIR)getcppsyms.c $(TEST_SUITE_SUPPORT) $(SDIR)bashbug.c
  404.  
  405. # BAGGAGE consists of things that you want to keep with the shell for some
  406. # reason, but do not actually use; old source code, etc.
  407. BAGGAGE = longest_sig.c
  408.  
  409. # Things that the world at large needs.
  410. THINGS_TO_TAR = $(SOURCES) $(LIBRARY_TAR) $(BASHDOCS) $(SUPPORT) $(BAGGAGE)
  411.  
  412. all: .made
  413.  
  414. # Keep GNU Make from exporting the entire environment for small machines.
  415. .NOEXPORT:
  416.  
  417. .made: $(Program)
  418.     cp .machine .made
  419.  
  420. $(Program): .build $(OBJECTS) $(LIBDEP) .distribution
  421.     $(RM) $@
  422.     $(CC) $(LDFLAGS) $(LIBRARY_LDFLAGS) -o $(Program) $(OBJECTS) $(LIBRARIES)
  423.     ls -l $(Program)
  424.     size $(Program)
  425.  
  426. .build:    $(SOURCES) cpp-Makefile newversion.aux
  427.     if ./newversion.aux -build; then mv -f newversion.h version.h; fi
  428.     @echo
  429.     @echo "     ***************************************************"
  430.     @echo "     *                         *"
  431.     @echo "     * Making Bash-`cat .distribution` for a $(Machine) running $(OS)."
  432.     @echo "     *                         *"
  433.     @echo "     ***************************************************"
  434.     @echo
  435.     @echo "$(Program) last made for a $(Machine) running $(OS)" >.machine
  436.  
  437. version.h:    newversion.aux
  438.     if ./newversion.aux -build; then mv -f newversion.h version.h; fi
  439.  
  440. y.tab.c:    parse.y parser.h command.h input.h
  441.         -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi
  442.         @echo expect 66 shift/reduce conflicts
  443.         $(BISON) -d parse.y
  444.         -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; fi
  445.  
  446. $(RL_LIBSRC)readline.olb: $(READLINE_SOURCE)
  447.     echo "Building in " $(RL_LIBSRC) "..."; ($(LIBINC_DECL); cd $(RL_LIBSRC); $(MAKE) -f Makefile-ST readline.olb $(MFLAGS) CFLAGS='$(LIBRARY_CFLAGS) '$(LIBINC_USAGE) CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)' RM='$(RM)')
  448.  
  449. $(GLOB_LIBSRC)glob.olb: $(GLOB_SOURCE)
  450.     echo "Building in " $(GLOB_LIBSRC) "..."; ($(LIBINC_DECL); cd $(GLOB_LIBSRC); $(MAKE) -f Makefile-ST glob.olb $(MFLAGS) CFLAGS='$(LIBRARY_CFLAGS) '$(LIBINC_USAGE) CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)' RM='$(RM)')
  451.  
  452. ./lib/tilde/tilde.olb: $(TILDE_SOURCE)
  453.     echo "Building in " $(TILDE_LIBSRC) "..."; ($(LIBINC_DECL); cd $(TILDE_LIBSRC); $(MAKE) -f Makefile-ST tilde.olb $(MFLAGS) CFLAGS='$(LIBRARY_CFLAGS) '$(LIBINC_USAGE) CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)' RM='$(RM)')
  454.  
  455. version.o: version.h version.c
  456.  
  457. shell.o: shell.h flags.h shell.c posixstat.h filecntl.h $(ENDIAN_HEADER) parser.h
  458.         $(RM) $@
  459.         $(CC) $(CFG_FLAGS) $(CFLAGS) $(CPPFLAGS) -c shell.c
  460.  
  461. signames.h: signames.aux
  462.         $(RM) $@
  463.         ./signames.aux $@
  464.  
  465. signames.aux:    signames.c
  466.         $(RM) $@
  467.         $(CC) $(CFLAGS) -o $@ signames.c
  468.  
  469. variables.o: shell.h hash.h flags.h variables.h variables.c
  470.         $(RM) $@
  471.         $(CC) -c $(CFLAGS) $(HOSTTYPE_DECL) $(CPPFLAGS) variables.c
  472.  
  473. builtins/libbuiltins.a: $(BUILTIN_DEFS) $(BUILTIN_C_CODE) config.h
  474.     ($(LIBINC_DECL); cd $(DEFDIR); $(MAKE) -f Makefile-ST $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS) '$(LIBINC_USAGE)' -I.' LDFLAGS='$(LDFLAGS)' RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)' RM='$(RM)' DIRECTDEFINE='-D '$(DEFDIR))
  475.  
  476. builtins/builtext.h: builtins/libbuiltins.a
  477.  
  478. $(SDIR)bashbug: $(SDIR)bashbug.c version.h
  479.     $(RM) $@
  480.     -$(CC) $(CFLAGS) $(CFG_FLAGS) -o $(SDIR)bashbug $(SDIR)bashbug.c
  481.  
  482. copy_cmd.o: shell.h command.h hash.h
  483. copy_cmd.o: general.h variables.h config.h quit.h
  484. dispose_cmd.o: shell.h command.h
  485. dispose_cmd.o: general.h variables.h config.h quit.h
  486. error.o: error.h
  487. execute_cmd.o: shell.h command.h y.tab.h posixstat.h flags.h jobs.h
  488. execute_cmd.o: general.h variables.h config.h quit.h hash.h $(ENDIAN_HEADER)
  489. execute_cmd.o: unwind_prot.h siglist.h builtins/builtext.h
  490. expr.o: shell.h command.h hash.h
  491. expr.o: general.h variables.h config.h quit.h
  492. flags.o: flags.h config.h general.h quit.h
  493. general.o: shell.h command.h maxpath.h
  494. general.o: general.h variables.h config.h quit.h machines.h
  495. hash.o: shell.h command.h hash.h
  496. hash.o: general.h variables.h config.h quit.h
  497. jobs.o: shell.h command.h hash.h trap.h jobs.h siglist.h
  498. jobs.o: general.h variables.h config.h $(ENDIAN_HEADER) quit.h builtins/builtext.h
  499. mailcheck.o: posixstat.h maxpath.h variables.h
  500. mailcheck.o: hash.h quit.h
  501. make_cmd.o: shell.h command.h flags.h
  502. make_cmd.o: general.h variables.h config.h quit.h
  503. y.tab.o: shell.h command.h flags.h maxpath.h alias.h
  504. y.tab.o: general.h variables.h config.h quit.h
  505. print_cmd.o: shell.h command.h y.tab.h
  506. print_cmd.o: general.h variables.h config.h quit.h
  507. shell.o: shell.h command.h flags.h machines.h
  508. shell.o: general.h variables.h config.h quit.h
  509. shell.o: posixstat.h filecntl.h jobs.h input.h
  510. subst.o: shell.h command.h flags.h jobs.h siglist.h
  511. subst.o: general.h variables.h config.h $(ENDIAN_HEADER) quit.h
  512. test.o: posixstat.h
  513. trap.o: trap.h shell.h command.h hash.h unwind_prot.h signames.h
  514. trap.o: general.h variables.h config.h quit.h
  515. unwind_prot.o: config.h general.h unwind_prot.h
  516. variables.o: shell.h command.h hash.h flags.h
  517. variables.o: config.h general.h variables.h quit.h
  518. version.o: version.h .build
  519.  
  520. alias.o: ansi_stdlib.h
  521. bashline.o: ansi_stdlib.h
  522. variables.o: ansi_stdlib.h
  523. shell.o: ansi_stdlib.h
  524. error.o: ansi_stdlib.h
  525. hash.o: ansi_stdlib.h
  526. signames.o: ansi_stdlib.h
  527. expr.o: ansi_stdlib.h
  528. general.o: ansi_stdlib.h
  529. input.o: ansi_stdlib.h
  530.  
  531. braces.o: general.h shell.h variables.h quit.h config.h
  532. braces.o: maxpath.h unwind_prot.h command.h
  533.  
  534. bracecomp.o: bracecomp.c
  535. bracecomp.o: shell.h command.h hash.h builtins.h general.h variables.h
  536. bracecomp.o: quit.h alias.h
  537.  
  538. bracecomp.o: $(RL_LIBSRC)readline.h
  539.  
  540. bashline.o: shell.h command.h hash.h builtins.h
  541. bashline.o: general.h variables.h config.h quit.h alias.h
  542.  
  543. bashline.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h
  544. y.tab.o: $(RL_LIBSRC)keymaps.h $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h
  545.  
  546. subst.o: $(HIST_LIBSRC)history.h
  547. bashline.o: $(HIST_LIBSRC)history.h
  548. y.tab.o: $(HIST_LIBSRC)history.h
  549.  
  550. subst.o: $(GLOB_LIBSRC)fnmatch.h
  551. execute_cmd.o: $(GLOB_LIBSRC)fnmatch.h
  552.  
  553. builtins/common.o: shell.h command.h config.h general.h error.h
  554. builtins/common.o: variables.h input.h hashcom.h siglist.h
  555. builtins/common.o: quit.h unwind_prot.h maxpath.h jobs.h builtins.h
  556.  
  557. builtins/alias.o: command.h config.h error.h general.h maxpath.h
  558. builtins/alias.o: quit.h builtins/common.h
  559. builtins/alias.o: shell.h command.h unwind_prot.h variables.h 
  560. builtins/bind.o: command.h config.h error.h general.h maxpath.h quit.h 
  561. builtins/bind.o: shell.h unwind_prot.h variables.h 
  562. builtins/bind.o: builtins/bashgetopt.h
  563. builtins/break.o: command.h config.h error.h general.h maxpath.h
  564. builtins/break.o: quit.h 
  565. builtins/break.o: shell.h unwind_prot.h variables.h 
  566. builtins/builtin.o: command.h config.h error.h general.h maxpath.h
  567. builtins/builtin.o: quit.h builtins/common.h
  568. builtins/builtin.o: shell.h unwind_prot.h variables.h 
  569. builtins/cd.o: command.h config.h error.h general.h maxpath.h quit.h 
  570. builtins/cd.o: shell.h unwind_prot.h variables.h builtins/common.h
  571. builtins/command.o: command.h config.h error.h general.h maxpath.h
  572. builtins/command.o: quit.h builtins/bashgetopt.h
  573. builtins/command.o: shell.h unwind_prot.h variables.h 
  574. builtins/declare.o: command.h config.h error.h general.h maxpath.h
  575. builtins/declare.o: quit.h 
  576. builtins/declare.o: shell.h unwind_prot.h variables.h 
  577. builtins/echo.o: command.h config.h error.h general.h maxpath.h
  578. builtins/echo.o: quit.h 
  579. builtins/echo.o: shell.h unwind_prot.h variables.h 
  580. builtins/enable.o: command.h config.h error.h general.h maxpath.h
  581. builtins/enable.o: quit.h 
  582. builtins/enable.o: shell.h unwind_prot.h variables.h 
  583. builtins/eval.o: command.h config.h error.h general.h maxpath.h quit.h 
  584. builtins/eval.o: shell.h unwind_prot.h variables.h 
  585. builtins/exec.o: command.h config.h error.h general.h maxpath.h quit.h 
  586. builtins/exec.o: shell.h unwind_prot.h variables.h builtins/common.h
  587. builtins/exit.o: command.h config.h error.h general.h maxpath.h
  588. builtins/exit.o: quit.h
  589. builtins/exit.o: shell.h unwind_prot.h variables.h 
  590. builtins/fc.o: builtins.h command.h 
  591. builtins/fc.o: command.h config.h error.h general.h maxpath.h quit.h 
  592. builtins/fc.o: flags.h unwind_prot.h variables.h shell.h 
  593. builtins/fc.o: builtins/bashgetopt.h
  594. builtins/fg_bg.o: command.h config.h error.h general.h maxpath.h
  595. builtins/fg_bg.o: quit.h 
  596. builtins/fg_bg.o: shell.h unwind_prot.h variables.h 
  597. builtins/getopts.o: command.h config.h error.h general.h maxpath.h quit.h 
  598. builtins/getopts.o: shell.h unwind_prot.h variables.h 
  599. builtins/hash.o: builtins.h command.h 
  600. builtins/hash.o: command.h config.h error.h general.h maxpath.h quit.h 
  601. builtins/hash.o: shell.h unwind_prot.h variables.h builtins/common.h
  602. builtins/help.o: command.h config.h error.h general.h maxpath.h
  603. builtins/help.o: quit.h 
  604. builtins/help.o: shell.h unwind_prot.h variables.h 
  605. builtins/history.o: command.h config.h error.h general.h maxpath.h
  606. builtins/history.o: quit.h
  607. builtins/history.o: filecntl.h shell.h unwind_prot.h variables.h 
  608. builtins/inlib.o: command.h config.h error.h general.h maxpath.h quit.h 
  609. builtins/inlib.o: shell.h unwind_prot.h variables.h 
  610. builtins/jobs.o: command.h config.h error.h general.h maxpath.h
  611. builtins/jobs.o: quit.h builtins/bashgetopt.h
  612. builtins/jobs.o: shell.h unwind_prot.h variables.h 
  613. builtins/kill.o: command.h config.h error.h general.h maxpath.h
  614. builtins/kill.o: quit.h
  615. builtins/kill.o: shell.h trap.h unwind_prot.h variables.h 
  616. builtins/let.o: command.h config.h error.h general.h maxpath.h
  617. builtins/let.o: quit.h 
  618. builtins/let.o: shell.h unwind_prot.h variables.h 
  619. builtins/read.o: command.h config.h error.h general.h maxpath.h
  620. builtins/read.o: quit.h 
  621. builtins/read.o: shell.h unwind_prot.h variables.h 
  622. builtins/return.o: command.h config.h error.h general.h maxpath.h
  623. builtins/return.o: quit.h 
  624. builtins/return.o: shell.h unwind_prot.h variables.h 
  625. builtins/set.o: command.h config.h error.h general.h maxpath.h
  626. builtins/set.o: quit.h 
  627. builtins/set.o: shell.h unwind_prot.h variables.h 
  628. builtins/setattr.o: command.h config.h error.h general.h maxpath.h
  629. builtins/setattr.o: quit.h builtins/common.h builtins/bashgetopt.h
  630. builtins/setattr.o: shell.h unwind_prot.h variables.h 
  631. builtins/shift.o: command.h config.h error.h general.h maxpath.h
  632. builtins/shift.o: quit.h 
  633. builtins/shift.o: shell.h unwind_prot.h variables.h 
  634. builtins/source.o: command.h config.h error.h general.h maxpath.h
  635. builtins/source.o: quit.h 
  636. builtins/source.o: shell.h unwind_prot.h variables.h 
  637. builtins/suspend.o: command.h config.h error.h general.h maxpath.h
  638. builtins/suspend.o: quit.h
  639. builtins/suspend.o: shell.h unwind_prot.h variables.h 
  640. builtins/test.o: command.h config.h error.h general.h maxpath.h
  641. builtins/test.o: quit.h 
  642. builtins/test.o: shell.h unwind_prot.h variables.h 
  643. builtins/times.o: command.h config.h error.h general.h maxpath.h
  644. builtins/times.o: quit.h
  645. builtins/times.o: shell.h unwind_prot.h variables.h 
  646. builtins/trap.o: command.h config.h error.h general.h maxpath.h
  647. builtins/trap.o: quit.h builtins/common.h
  648. builtins/trap.o: shell.h unwind_prot.h variables.h 
  649. builtins/type.o: command.h config.h error.h general.h maxpath.h
  650. builtins/type.o: quit.h builtins/common.h
  651. builtins/type.o: shell.h unwind_prot.h variables.h 
  652. builtins/ulimit.o: command.h config.h error.h general.h maxpath.h
  653. builtins/ulimit.o: quit.h 
  654. builtins/ulimit.o: shell.h unwind_prot.h variables.h 
  655. builtins/umask.o: command.h config.h error.h general.h maxpath.h
  656. builtins/umask.o: quit.h 
  657. builtins/umask.o: shell.h unwind_prot.h variables.h 
  658. builtins/wait.o: command.h config.h error.h general.h maxpath.h
  659. builtins/wait.o: quit.h 
  660. builtins/wait.o: shell.h unwind_prot.h variables.h
  661.  
  662. builtins/mkbuiltins.o: ansi_stdlib.h
  663. builtins/fc.o: ansi_stdlib.h
  664.  
  665. $(Program).tar: $(THINGS_TO_TAR) .distribution
  666.     @$(MKTARFILE) $(Program) `cat .distribution` $(THINGS_TO_TAR)
  667.  
  668. $(Program).tar$(COMPRESS_EXT):    $(Program).tar
  669.         $(COMPRESS) < $(Program).tar > $@
  670.  
  671. clone:        $(THINGS_TO_TAR)
  672.         @$(MKTARFILE) +notar $(Machine) $(OS) $(THINGS_TO_TAR)
  673.  
  674. install:    .made
  675.         -if [ -f $(bindir)/$(Program) ];          then mv $(bindir)/$(Program) $(bindir)/$(Program).old;         fi
  676.         cp $(Program) $(bindir)/$(Program)
  677.         $(RM) installed-$(Program)
  678.         -ln -s $(bindir)/$(Program) installed-$(Program)
  679.  
  680. mailable:    distribution
  681.         /bin/rm -rf uuencoded
  682.         mkdir uuencoded
  683.         $(SHELL) -c 'f=$(Program)-`cat .distribution`.tar.Z;uuencode $$f $$f | split -800 - uuencoded/$$f.uu.'
  684.  
  685. .distribution:
  686.         ./newversion.aux -dist `$(Program) -c 'echo $$BASH_VERSION'`
  687.  
  688. distribution:    $(Program) $(Program).tar$(COMPRESS_EXT) .distribution
  689.         @echo cp $(Program).tar$(COMPRESS_EXT)             $(Program)-`cat .distribution`.tar$(COMPRESS_EXT)
  690.         @cp $(Program).tar$(COMPRESS_EXT)             $(Program)-`cat .distribution`.tar$(COMPRESS_EXT)
  691.  
  692. newversion.aux:    newversion.c
  693.         $(CC) $(CFLAGS) -o newversion.aux newversion.c -lm
  694.  
  695. newversion:    newversion.aux
  696.         $(RM) .build
  697.         ./newversion.aux -dist
  698.         mv -f newversion.h version.h
  699.         $(MAKE) -f Makefile-ST $(MFLAGS)
  700.  
  701. documentation: documentation-force
  702.         (cd $(DOCDIR); make -f Makefile-ST)
  703.  
  704. documentation-force:
  705.  
  706. tags:        $(SOURCES) $(BUILTIN_C_CODE) $(LIBRARY_SOURCE)
  707.         etags $(SOURCES) $(BUILTIN_C_CODE) $(LIBRARY_SOURCE)
  708.  
  709. INDEX:        $(SOURCES) $(BUILTIN_C_CODE) $(LIBRARY_SOURCE)
  710.         ctags -x $(SOURCES) $(BUILTIN_C_CODE) $(LIBRARY_SOURCE) > $@
  711.  
  712. clean:
  713.         $(RM) $(OBJECTS) $(Program) ansi-Makefile *.aux
  714.         $(RM) .build .made version.h
  715.         $(RM) $(CREATED_SUPPORT) bash-Makefile
  716.         (cd $(DOCDIR); $(MAKE) -f Makefile-ST $(MFLAGS) clean)
  717.         (cd builtins; $(MAKE) -f Makefile-ST $(MFLAGS) clean)
  718.         (cd $(RL_LIBSRC); $(MAKE) -f Makefile-ST $(MFLAGS) clean);
  719.         :;
  720.         :;
  721.         (cd $(GLOB_LIBSRC); $(MAKE) -f Makefile-ST $(MFLAGS) clean);
  722.         (cd $(TILDE_LIBSRC); $(MAKE) -f Makefile-ST $(MFLAGS) clean);
  723.         :;
  724.  
  725. PATCHES-ST:
  726.         rcsdiff -u -r1.1 RCS/* */RCS/* */*/RCS/* > PATCHES-ST
  727.  
  728. # Here is a convenient rule when you arrive at a new site and wish to
  729. # install bash on several different architectures. It creates a new
  730. # directory to hold the results of compilatation. The directory is
  731. # named Machine-OS.
  732. architecture: $(Machine)-$(OS)/$(Program)
  733.  
  734. $(Machine)-$(OS):
  735.     -mkdir $(Machine)-$(OS)
  736.  
  737. $(Machine)-$(OS)/$(Program): $(Machine)-$(OS) $(Program)
  738.     mv $(Program) $(Machine)-$(OS)
  739.     mv sysdefs.h $(Machine)-$(OS)
  740.     mv $(SDIR)getcppsyms $(Machine)-$(OS)
  741.     $(MAKE) -f Makefile-ST $(MFLAGS) clean
  742.  
  743. DEFINES: config.h cpp-Makefile sysdefs.h
  744.     echo $(CFLAGS) $(CPPFLAGS) >DEFINES
  745.